<div id="carbonForm" style="margin-top: 60px;margin-bottom: 30px;">
    <form method="post">
        <div class="formRow">
            <div class="field">
                <input type="text" name="searchs">
            </div>
            <div class="field">
                <input type="submit" name="search" value="搜索"/>
            </div>
        </div>
    </form>
    <?php
    include 'config/DB.php';
    $connection = new DB();
    if (isset($_POST['search']))
    {
        $searcharray = explode(' ', $_POST['searchs']);
        foreach ($searcharray as $searchs => $searchitem)
        {
            $result = $connection->get_all("SELECT * FROM data WHERE title OR introduction OR details LIKE '%" . $searchitem . "%'");
            foreach ($result as $item)
            {
                echo '<fieldset>';
                echo '<h1><a href="?page=showpost&id=' . $item['id'] . '">' . $item['title'] . '</a></h1>';
                echo '</br>';
                echo '<span>' . $item['introduction'] . '</span>';
                echo '</fieldset>';
            }
        }
    }
    ?>
</div>